home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / gus / sdkdigv8.zip / SDKV8N23.TXT < prev    next >
Text File  |  1994-01-28  |  8KB  |  283 lines

  1. Apparently-To: john.smith@gravis.com
  2.  
  3.  
  4. GUS Programmer's Digest     Fri, 28 Jan 94  4:09         Volume 8: Issue  23  
  5.  
  6. Today's Topics:
  7.                             Documentation
  8.                             FAST UltraPoke
  9.         Reading voice while playing it - strange side effects
  10.                           Subscribe (2 msgs)
  11.  
  12. Standard Info:
  13.     - Meta-info about the GUS can be found at the end of the Digest.
  14.     - Before you ask a question, please READ THE FAQ.
  15.  
  16. ----------------------------------------------------------------------
  17.  
  18. Date: Thu, 27 Jan 94 14:21:14 EST
  19. From: jdimich@ajiant.dnet.dupont.com
  20. Subject: Documentation
  21.  
  22.    I was just wondering if there was something wrong with the documentation in
  23. the SDK v2.10.  It almost seems like the .doc files have been corrupted, and I
  24. recall seeing a postscript version of them somewhere, but I can not recall
  25. where.  Could someone please inform me of the problem or of where I can get
  26. some working documentation?  I tried every word processor I have, but nothing
  27. would work.  Is it possible to maybe send me some non-corrupted documentation?
  28.                                 
  29.  
  30.                         Sincerely,
  31.                         Jason DiMichele
  32.                      jdimich@ajiant.dnet.dupont.com                         
  33.  
  34. ------------------------------
  35.  
  36. Date: Thu, 27 Jan 1994 13:21:42 +0100 (MET)
  37. From: appel@stack.urc.tue.nl (Stanley Appel)
  38. Subject: FAST UltraPoke
  39.  
  40. Hi,
  41.  
  42. There is a routine i designed to transfer data into GUS DRAM without
  43. DMA (I have a OPTI). There is some smart I/O in it that makes it 
  44. extreme FAST.
  45.  
  46. I did some benchmarks with it on my 486sx/25
  47.   UltraPokeData   :   47KByte/Sec
  48.   GusPoke (mine)  :   75KByte/Sec
  49.   GusWrite (this) :   203KByte/Sec
  50.  
  51. So i think it is worth posting in the SDK mailing list.
  52. Maybe Some Other people whant to use it in there own progs.
  53.   - Metal (with -nodma switch)
  54.   - DMP
  55.   - etc.
  56.  
  57. The defintion of the function is :
  58.   procedure GusWrite (Address : LongInt; var Buffer; Count : Word);
  59.  
  60.      Address -> Start position in GUS DRAM
  61.      Buffer  -> linear array of bytes or words
  62.      Count   -> How many bytes !!! or SIZEOF(Buffer) !!!
  63.  
  64. There are 4 extra variables needed in your programma
  65.  
  66.    GF1_REG_SELECT : Word;  { GUSBASE + $103 }
  67.       The address of the GUS register selector, This may also be
  68.       a constant (pref not).
  69.  
  70.    DRAM           : Word;  { GUSBASE + $107 }
  71.       The address of the I/O port for GUS DRAM, this may also be
  72.       a constant (pref not).
  73.  
  74.    GusDataConvert : Boolean;
  75.        A boolean which tells this routine to convert it's data
  76.        into 2cmp or not.
  77.          GusDataConvert = True  -> Convert it into 2cmp
  78.          GusDataConvert = False -> Don't convert it into 2cmp
  79.  
  80.    GusData16Bits  : Boolean;
  81.        A boolean which tells this routine if the data is
  82.        16bits or 8bits, this is needed for converting the
  83.        data in 2cmp.
  84.           GusData16Bits = True  -> The buffer is words
  85.           GusData16Bits = False -> The buffer is byts
  86.        !!! The Count from GusWrite is ALWAYS in bytes !!!
  87.  
  88.  
  89.  
  90. procedure GF1_OUT_BYTE; assembler;
  91. (*
  92.    INPUT: AL -> GF1_REGISTER_SELECT
  93.           BL -> GF1_DATA
  94. *)
  95. asm
  96.   mov   dx, GF1_REG_SELECT
  97.   out   dx, al
  98.   inc   dx
  99.   inc   dx
  100.   mov   al, bl
  101.   out   dx, al
  102. end;
  103.  
  104. procedure GusWrite (Address : LongInt; var Buffer; Count : Word); assembler;
  105. (*
  106.     INPUT:   Address -> Start position in GUS DRAM
  107.              Buffer  -> linear array of bytes
  108.              Count   -> How many bytes !!! or SIZEOF(Buffer)
  109. *)
  110. var
  111.    GusDataHigh : Boolean;
  112. asm
  113.   (* PUSH ES *)
  114.   push  es
  115.  
  116.   (* SET REGISTERS  CX:SI=ADDRESS  ES:DI=BUFFER *)
  117.   mov   si, [bp + offset Address + 0]
  118.   mov   cx, [bp + offset Address + 2]
  119.  
  120.   mov   di, [bp + offset Buffer + 0]
  121.   mov   es, [bp + offset Buffer + 2]
  122.  
  123.   (* GUSDATAHIGH := FALSE *)
  124.   mov   GusDataHigh, 1
  125.  
  126.   (* ADDRESS HIGH *)
  127.   mov   al, 44h
  128.   mov   dx, GF1_REG_SELECT
  129.   out   dx, al
  130.   inc   dx
  131.   inc   dx
  132.   mov   al, cl
  133.   out   dx, al
  134.   (* SELECT ADDRESS LOW *)
  135.   mov   dx, GF1_REG_SELECT
  136.   mov   al, 43h
  137.   out   dx, al
  138.  
  139.   @lab1:
  140.   (* ADDRESS LOW *)
  141.   mov   dx, GF1_REG_SELECT
  142.   inc   dx
  143.   mov   ax, si
  144.   out   dx, ax
  145.  
  146.   (* READ BUFFER *)
  147.   mov   al, es:[di]
  148.   inc   di
  149.  
  150.   (* 2CMP / 16BITS *)
  151.   cmp   GusDataConvert, 0
  152.   je    @signed
  153.   cmp   GusData16Bits, 0
  154.   je    @unsigned
  155.   dec   GusDataHigh
  156.   jnz   @unsigned
  157.   mov   GusDataHigh, 2
  158.   jmp   @signed
  159.   @unsigned:
  160.   xor   al, 80h
  161.  
  162.   @signed:
  163.   (* WRITE DRAM *)
  164.   mov   dx, DRAM
  165.   out   dx, al
  166.  
  167.   (* INC ADDRESS *)
  168.   inc   si
  169.   jnz   @lab2
  170.   inc   cx
  171.  
  172.   (* ADDRESS HIGH *)
  173.   mov   al, 44h
  174.   mov   dx, GF1_REG_SELECT
  175.   out   dx, al
  176.   inc   dx
  177.   inc   dx
  178.   mov   al, cl
  179.   out   dx, al
  180.   call  GF1_OUT_BYTE
  181.   (* SELECT ADDRESS LOW *)
  182.   mov   dx, GF1_REG_SELECT
  183.   mov   al, 43h
  184.   out   dx, al
  185.  
  186.   @lab2:
  187.   (* LOOP UNTIL COUNT = 0 *)
  188.   dec   Count
  189.   jnz   @lab1
  190.  
  191.   (* POP ES *)
  192.   pop   es
  193. end;
  194.  
  195.  
  196. Keep On GUSing (with more source code to the PUBLIC)
  197.  
  198. Stanley Appel
  199.  
  200. ------------------------------
  201.  
  202. Date: Fri, 28 Jan 1994 10:05:14 SAT
  203. From: "Michael Patricios" <PATRICIO@odie.ee.wits.ac.za>
  204. Subject: Reading voice while playing it - strange side effects
  205.  
  206. I have recently been writing a bit of a MOD player for the GUS and am
  207. trying to put some oscilloscope type thingys, one for each channel.
  208. The way I am doing this is to read the voice accumulator position and
  209. then peek that address in GUS RAM. Works great, the only problem being
  210. that when I draw the waveforms on the screen, I occassionally get
  211. weird noises (kinda like "squeaks") coming from my GUS.
  212.  
  213. If I continuously read the voice position and peek the address, this 
  214. does not seem to happen, only if I am using graphics at the same time.
  215. If I just draw a whole lot of crap on the screen without reading 
  216. anything from the GUS, it doen't seem to happen either. It only seems 
  217. to happen when I read AND use graphics!!!!!!!
  218.  
  219. Any ideas anybody??
  220.  
  221. I thought it might be my MOD playing routines so I took the source 
  222. for GUSPLAY 1.5 and modified it to do a similar thing and I did get
  223. similar squeaks.
  224.  
  225. Is there perhaps a better way of drawing a scope on the screen???
  226. Obviously all the sample data is in GUS RAM so I will definitely
  227. need to peek it.
  228.  
  229. Oh yes, The graphics mode I am using at present is unchained vga
  230. 320x200x256 (a mode-x type mode).
  231.  
  232. Thanks for any input.
  233.  
  234. Michael Patricios
  235. patricios@odie.ee.wits.ac.za
  236. #include "clever_quote.h"
  237.  
  238. ------------------------------
  239.  
  240. Date: Thu, 27 Jan 1994 08:33:43 -0500
  241. From: ac151@freenet.carleton.ca (David Clarke)
  242. Subject: Subscribe
  243.  
  244. subscribe
  245.  
  246.  
  247. --
  248.  ------------------------------  /'''  --------------------------------
  249. David Clarke                     c-00             davec@rflab.ee.ubc.ca 
  250. ac151@Freenet.carleton.ca           >  clarkec@sfu.ca  dacl@mtsa.ubc.ca
  251.  ------------------------------    -   --------------------------------
  252.  
  253. ------------------------------
  254.  
  255. Date: Thu, 27 Jan 1994 09:18 EST
  256. From: 155722937@UCIS.VILL.EDU (LIFE IS A GREAT ADVENTURE)
  257. Subject: subscribe
  258.  
  259. subscribe
  260.  
  261. ------------------------------
  262.  
  263. End of GUS Programmer's Digest V8 #23
  264. *************************************
  265.  
  266. To post to tomorrow's digest:                    <gus-sdk@dsd.es.com>
  267. To (un)subscribe or get help:            <gus-sdk-request@dsd.es.com>
  268. To contact a human (last resort):          <gus-sdk-owner@dsd.es.com>
  269.  
  270. FTP sites:           archive.epas.utoronto.ca              /pub/pc/ultrasound
  271.                      wuarchive.wustl.edu            /systems/ibmpc/ultrasound
  272.                      archive.orst.edu                    /pub/packages/gravis
  273.                      theoris.rz.uni-konstanz.de                /pub/sound/gus
  274.                      nctuccca.edu.tw                           /PC/ultrasound
  275. FTP mail server:     mail-server@nike.rz.uni-konstanz.de
  276.  
  277. Hints:
  278.       - Get the FAQ from the FTP sites or the request server.
  279.       - Mail to <gus-sdk-request@dsd.es.com> for info about other GUS
  280.     related mailing lists (general use, musician's, etc.).
  281.  
  282.  
  283.